package com.pig.graduate.controller.material;


import com.pig.graduate.domain.material.MaterialInventory;
import com.pig.graduate.domain.material.MaterialStorage;
import com.pig.graduate.result.MyResult;
import com.pig.graduate.service.material.MaterialInventoryService;
import com.pig.graduate.service.material.MaterialStorageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = {"入库"}, description = "入库")
@RestController
@RequestMapping("/material/storage")
public class MaterialStorageController {



    @Autowired
    private MaterialStorageService materialStorageService;

    @ApiOperation(value = "入库列表",notes = "入库列表")
    @PostMapping("/list")
    public MyResult storageList(@RequestBody MaterialStorage materialStorage){
        return materialStorageService.storageList(materialStorage);
    }

    @ApiOperation(value = "入库",notes = "入库")
    @PostMapping("/add")
    public MyResult addMaterialStorage(@RequestBody MaterialStorage materialStorage){
        return materialStorageService.addMaterialStorage(materialStorage);
    }

    @ApiOperation(value = "过期提醒",notes = "过期提醒")
    @PostMapping("/expiration")
    public MyResult expirationReminders(@RequestBody MaterialStorage materialStorage){
        return materialStorageService.expirationReminders(materialStorage);
    }

}
